<template>
  <div class="home">
    <h1>{{ user?.name }}</h1>
    <img alt="Vue logo" src="../assets/img/logo.svg" />
    <HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
    <a-button>侃侃</a-button>
  </div>
</template>

<script lang="ts">
import { computed, defineComponent } from 'vue'
import HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src
import { useUserStore } from '@/store/user'

export default defineComponent({
  name: 'Home',
  components: {
    HelloWorld,
  },
  setup() {
    const store = useUserStore()

    return {
      user: computed(() => store.user),
    }
  },
})
</script>
